<?php


namespace app\common\lib;


class Redis extends \Redis
{
    static $connection;
    static $expire;
    static $instance;

    /**
     * @return self
     */
    static function instance(){
        return self::$connection;
    }
    static function connection($host,$port,$timeout = 300,$expire =1800){
        self::$connection = new self();
        self::$connection ->connect($host,$port,$timeout);
        self::$expire = $expire;
    }

}